<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    let xhr = new XMLHttpRequest;
    xhr.open('GET', 'http://api.juheapi.com/japi/toh');
    xhr.onreadystatechange = function () {
      if (xhr.readyState === 4 && /^(2|3)\d{2}$/.test(xhr.status)) {
          console.log(xhr.response);
      }
    }
    xhr.send()
  </script>
</body>

</html>